<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <Script>
        console.log("=====2.38esport命令====");
        let name = "tom";
        let age = 20;
        let phone = '12813661234';

        let introduce = function(){
            return `My name is ${name}! I'm ${age}years old!`;
        };

        export{name,age,phone,introduce};


        console.log("====2.39使用export命令注意事项=====");
        //报错1
        // export ;
        //报错2
        // var m =1;
        // export m;

        //正确写法一
        export var m = 1;
        // 二
        var m = 1;
        export{m};

        //三
        var n = 1;
        export {n as m};

    </Script>
</body>
</html>